<template>
    <div>
        <h2>我是Count组件</h2>
        <button @click="count1++">累加父组件的穿过来的count1</button>
        <button @click="add">查看组件实例</button>
        <p>子组件展示父组件传过来的count</p>
        <p>{{ count1 }}</p>
    </div>
</template>

<script>
export default {
    name: "Count",
    props: ['count'],
    data() {
        return {
            count1: this.count
        };
    },
    methods: {
        add() {
            console.log(this);
            console.log(this.count);
            console.log(this.$props.count);
        }
    }
};
</script>

<style></style>
